#include "thread.h"
#include <stdio.h>
#include <assert.h>

/*
static void * threadfunc1(void * arg)
{
	thread_yield();	
	thread_exit(arg);
}

static void * threadfunc2(void *arg)
{
	thread_yield();	
	printf("ok\n");
	thread_exit(arg);
}

int main(){
	printf("TEST: vérifier que la terminaison du thread courant provoque le passage de la main à un autre thread\n");
	thread_t thread1, thread2;
	int err;
	void *retval1, *retval2;
	err = thread_create(&thread1, threadfunc1, "thread1");
  	assert(!err);
  	err = thread_create(&thread2, threadfunc2, "thread2");
  	assert(!err);
	err = thread_join(thread2, &retval2);
  	assert(!err);
	err = thread_join(thread1, &retval1);
	assert(!err);
	return EXIT_SUCCESS;
}*/
